﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LocalizerUtility
{
    static class LanguageFamily
    {
        /*
        public static string Indo_European = "Indo-European";
        public static string Northwest_Caucasian = "Northwest Caucasian";
        public static string Afro_Asiatic = "Afro-Asiatic";
        public static string Niger_Congo = "Niger-Congo";
        public static string Northeast_Caucasian = "Northeast Caucasian";
        public static string Aymaran = "Aymaran";
        public static string Turkic = "Turkic";
        public static string Language_isolate = "Language isolate";
        public static string Creole = "Creole";
        public static string Sino_Tibetan = "Sino-Tibetan";
        public static string Austronesian = "Austronesian";
        public static string Algonquian = "Algonquian";
        public static string Constructed = "Constructed";
        public static string Finno_Ugric = "Finno-Ugric";
        public static string South_Caucasian = "South Caucasian";
        public static string Tupi_Guarani = "Tupi-Guarani";
        public static string Eskimo_Aleut = "Eskimo-Aleut";
        public static string Japonic = "Japonic";
        public static string Dravidian = "Dravidian";
        public static string Nilo_Saharan = "Nilo_Saharan";
        public static string Austro_Asiatic = "Austro-Asiatic";
        public static string Language_isolate_controversial = "Language isolate (controversial)";
        public static string Tai_Kadai = "Tai-Kadai";
        public static string Mongolic = "Mongolic";
        public static string Dene_Yeniseian = "Dene-Yeniseian";
        public static string Quechuan = "Quechuan";
        */
        private static string[] Families = new string[] { "Indo-European", "Northwest Caucasian", "Afro-Asiatic", 
                                            "Niger-Congo", "Northeast Caucasian", "Aymaran", "Turkic", "Language isolate",
                                            "Creole", "Sino-Tibetan", "Austronesian", "Algonquian", "Constructed",
                                            "Finno-Ugric", "South Caucasian", "Tupi-Guarani", "Eskimo-Aleut", "Japonic",
                                            "Dravidian", "Nilo_Saharan", "Austro-Asiatic", "Language isolate (controversial)",
                                            "Tai-Kadai", "Mongolic", "Dene-Yeniseian", "Quechuan" };
        
        public static int GetLanguageFamilyCode(string s)
        {
            int result = -1;
            for (int i = 0; i<Families.Length; i++)
                if (s.CompareTo(Families[i]) == 0)
                {
                    result = i;
                    break;
                }
            return result;
        }
    }
}
